package com.ss.baseinfo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ss.baseinfo.dao.CourseDao;
import com.ss.baseinfo.pojo.CourseInfo;
import com.ss.baseinfo.service.CourseService;
/**
 * 课程
 * @author Administrator
 *
 */
@Service("courseService")
public class CourseServiceImpl implements CourseService {
	@Autowired
	private CourseDao dao;
	@Override
	public void add(CourseInfo info) throws Exception {
		// TODO Auto-generated method stub
		dao.add(info);
	}

	@Override
	public boolean update(CourseInfo info) throws Exception {
		// TODO Auto-generated method stub
		int r=dao.update(info);
		return r>0?true:false;
	}

	@Override
	public List<CourseInfo> query(CourseInfo info) throws Exception {
		// TODO Auto-generated method stub
		return dao.query(info);
	}

	@Override
	public CourseInfo getOneById(String id) throws Exception {
		// TODO Auto-generated method stub
		return dao.getOneById(id);
	}

}
